<?php
namespace app\common\helper\sms;
use Qiniu\Auth;
use Qiniu\Sms\Sms;
class SmsQiniuHandler{
    private $config;
    public function __construct($config) {
        $this->config = $config;
    }
    
    /**
     * 发送短信的
     * @param smsId 模版ID
     */
    public function sendSms($smsId,$mobiles,$params){
        $auth = new Auth(trim($this->config['ak']), $this->config['sk']);
        $sms =  new Sms($auth);
        return $ret = $sms->sendMessage($smsId,$mobiles,$params);
    }
}